@space: 24px;
@border_light: #d9d9d9;
@border_dark: #868686;
@import '~@/pages/global.less';

.modalDefault() {
  :global {
    .ant-modal-header {
      padding-top: 18px;
      padding-bottom: 0;
      border-bottom: 0 !important;
    }

    .ant-modal-body {
      padding: 0 8px 24px 24px;
    }

    .ant-modal-footer {
      padding: @space;
      padding-top: 0;
      border-top: 0 !important;
    }

    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 16px;
    }
  }
}

.modal {
  .modalDefault();

  .modal_title {
    display: flex;
    align-items: center;
    height: 30px;
    padding-left: 37px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1;
    background-image: url('~@/assets/img/plan_icon.png');
    background-repeat: no-repeat;
    background-size: 30px 30px;
  }

  .modal_body {
    display: flex;
    width: 100%;
    height: 328px;
    overflow: hidden;
    border: 1px solid @border_light;
    border-radius: 4px;

    .treebox,
    .choosebox {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 16px 0;
      overflow: hidden;
    }

    .treebox {
      border-right: 1px solid @border_light;
    }

    .box_header {
      height: 32px;
      margin-bottom: 8px;
      padding: 0 16px;
    }

    .box_content {
      flex: 1;
      padding: 0 16px;
    }

    .choosebox {
      .box_content {
        overflow-y: auto;
      }

      .box_header {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
    }

    .chooseList {
      margin: 0;
      padding: 0;
      color: #595959;
      list-style: none;

      > li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 28px;

        .chooseName {
          flex: 1;
          overflow: hidden;
        }
      }
    }

    .close {
      width: 16px;
      height: 16px;
      color: #bfbfbf;
    }

    .clear {
      color: #8c8c8c;
      cursor: pointer;
    }
  }

  .foot {
    width: 80px;
    font-weight: 500;
    font-size: 12px;
    border-radius: 5px;
  }

  .search_act {
    color: #18a0fb;
  }
}

html[data-type-color='dark'] {
  .modal {
    .modelOverWrite();
    // :global {
    //   ::-webkit-scrollbar {
    //     width: 6px;
    //     height: 10px;
    //     background: transparent;
    //   }

    //   ::-webkit-scrollbar-thumb {
    //     background: #acb1c1;
    //     border-radius: 5px;
    //     opacity: 0.5;
    //   }

    //   ::-webkit-scrollbar-track {
    //     border-radius: 5px;
    //   }

    //   .ant-modal-header,
    //   .ant-modal-content {
    //     background-color: #3a3a3a;
    //   }

    //   .ant-input-affix-wrapper {
    //     border-color: #757575;
    //   }

    //   .ant-checkbox-inner,
    //   .ant-tree-checkbox-inner,
    //   .ant-checkbox-indeterminate .ant-checkbox-inner {
    //     background: #2b2d30;
    //     border-color: #fff;
    //   }

    //   .ant-modal-header {
    //     background: var(--bg-main) !important;
    //   }

    //   .ant-modal-body {
    //     background: var(--bg-main) !important;
    //   }

    //   .ant-modal-footer {
    //     background: var(--bg-main) !important;
    //   }
    // }
  }
}

.scrollBox {
  height: 614px;
  overflow-y: scroll;
}

.item {
  display: flex;
  flex-direction: column;
  width: 240px;
  height: 110px;
  padding: 16px;
  border: 1px solid #4e5154;
  border-radius: 5px;

  .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 7px;

    .title {
      overflow: hidden;
      color: #fff;
      font-weight: 500;
      font-size: 16px;
      font-family: 'PingFang SC';
      font-style: normal;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .chart {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;

      .textNum {
        position: absolute;
        font-size: 12px;
      }

      :global {
        .ant-progress-text {
          color: rgba(255, 255, 255, 0.85) !important;
        }
      }
    }
  }

  .bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    .btm_left {
      display: flex;
      flex-direction: column;
    }

    .btm_right {
      display: flex;
      flex-direction: column;
      padding-left: 64px;
    }

    .label {
      color: #7a7d7f;
      font-weight: 400;
      font-size: 12px;
      font-family: 'PingFang SC';
      font-style: normal;
    }

    .power {
      padding-top: 4px;
      color: #d3d4d4;
      font-weight: 500;
      font-size: 12px;
      font-family: 'PingFang SC';
      font-style: normal;
    }
  }
}
